package com.goodjia.phase1module3;

public class ToStringTest {

    public static void main(String[] args) {

        // 数组长度为0时打印数组
        int[] arr = new int[]{};
        String str = PrintArray.toString(arr);
        System.out.println("str = " + str);

        // 数组为null时打印数组
        str = PrintArray.toString(null);
        System.out.println("str = " + str);

        // 数组有数据情况打印
        int[] arr1 = new int[]{1,2,3,4,5};
        str = PrintArray.toString(arr1);
        System.out.println("str = " + str);

    }
}
